// http://192.168.20.5:8080/api/v1/User/search
import httpAxios from "@/utilx/http/axios.ts";
import type {PageResult, SearchById, SearchWithPage} from "@/typex";
import {AxiosResult, cloud} from "@/api/dto";

export namespace LogApi {
    const routeGroup = "log/traffic"
    export const TrafficSearch = async (data: SearchWithPage<cloud.TrafficReq>): AxiosResult<PageResult<cloud.Traffic>> => httpAxios.post(routeGroup.concat("/search"), data);
    export const TrafficAdd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/add"), data);
    export const TrafficUpd = async (data: any): AxiosResult<boolean> => httpAxios.post(routeGroup.concat("/upd"), data);
    export const TrafficGet = async (data: SearchById): AxiosResult<cloud.Traffic> => httpAxios.post(routeGroup.concat("/get"), data);
}

